"""Definition of the Palavra Pastoral content type
"""

from zope.interface import implements

from Products.Archetypes import atapi
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.content import newsitem

from shema.archetype import archetypeMessageFactory as _
from shema.archetype.interfaces import IPalavraPastoral
from shema.archetype.config import PROJECTNAME



PalavraPastoralSchema = newsitem.ATNewsItemSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

PalavraPastoralSchema['title'].storage = atapi.AnnotationStorage()
PalavraPastoralSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(PalavraPastoralSchema, moveDiscussion=False)


class PalavraPastoral(newsitem.ATNewsItem):
    """Mensagem do pastor"""
    implements(IPalavraPastoral)

    meta_type = "Palavra Pastoral"
    _at_rename_after_creation = True
    schema = PalavraPastoralSchema

    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')

    # -*- Your ATSchema to Python Property Bridges Here ... -*-

atapi.registerType(PalavraPastoral, PROJECTNAME)
